package cn.gd.service.systemAdministration.organizations;

import cn.gd.pojo.Department;
import cn.gd.pojo.Organizationstructure;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrganizationsService {
    /**
     * 获取组织结构和部门名称
     * @return
     */
    List<Organizationstructure> getAllOrganizations();

    /**
     * 根据ID获取部门
     *
     * @param id
     * @return
     */
    Department getDepartmentById(@Param("id") Integer id);

    /**
     * 根据组织结构ID或部门ID获取组织结构名
     * @param deptId
     * @param orgId
     * @return
     */
    Organizationstructure getOrganizationStructureNameById(@Param("deptId") Integer deptId,@Param("orgId") Integer orgId);

    /**
     * 根据ID修改部门信息
     *
     * @param department
     * @return
     */
    Boolean updateDepartmentById(Department department);

    /**
     * 根据部门ID删除部门信息
     *
     * @param id
     * @return
     */
    Boolean deleteDepartmentById( Integer id);

    /**
     * 根据组织结构ID获取组织结构信息
     *
     * @param orgId
     * @return
     */
    Organizationstructure getOrganizationstructureByOrgId( Integer orgId);

    /**
     * 新增部门信息
     *
     * @param department
     * @param orgId
     * @return
     */
    Boolean addDepartment(Department department, Integer orgId);

    /**
     * 删除组织结构信息根据组织ID
     * @param orgId
     * @return
     */
    Boolean deleteOrganizationStructureByOrgId(Integer orgId);


    /**
     * 新增组织结构
     * @param organizationstructure
     * @return
     */
    Boolean addOrganizationStructure(Organizationstructure organizationstructure);

    Boolean updateOrganizationalByOrgId(Organizationstructure organization);
}
